<template>
  <div class="pager">
    <el-pagination
        v-if="pagination"
        :current-page="pagination.currentPage"
        :page-sizes="[10, 20, 30, 50, 100]"
        :page-size.sync="pagination.pageSize"
        :layout="pagination.layout"
        @size-change="handleSizeChange"
        @current-change	="handleCurrentChange"
        :popper-class="pagination.popperClass"
        :total="pagination.total">
    </el-pagination>
  </div>
</template>

<script>
export default {
  name: "pager",
  props: {
    pagination:{
      type: [Boolean,Object],
      default() {
        return false;
      }
    }
  },
  methods:{
    // 当前页码
    handleSizeChange(val){
      this.$emit('sizeChange',val)
    },
    // 当前页大小
    handleCurrentChange(val){
      this.$emit('currentChange',val)
    }
  }
}
</script>

<style >
</style>
